  <!-- Site Showcase -->
  <style>
  .col-md-9 table th {
	  font-weight:bold;
	  }
  </style>
  <div class="site-showcase">
    <!-- Start Page Header -->
    <div class="parallax page-header" style="background-image:url(<?php echo $this->Html->url('/images/page-header1.jpg'); ?>">
          <div class="container">
              <div class="row">
                  <div class="col-md-12">
                      <h1><?php echo __('Property Listing'); ?></h1>
                  </div>
             </div>
         </div>
    </div>
    <!-- End Page Header -->
  </div>
  <!-- Start Content -->
  <div class="main" role="main">
      <div id="content" class="content full">
          <div class="container">
              <div class="row">
                  <div class="col-md-9 ">
                  

				  <?php
//	echo $this->Paginator->counter(array('format' => __('Total %count% Record Found')));
	?>	
                      <div class="block-heading">
                      <?php
							  $List_type	=	'list'; 
							  if($this->Session->check('List_type')) $List_type	=	$this->Session->read('List_type'); 
							  
							  if($List_type	=='list')
							  $type_class	=	'list';
							  else
							  $type_class	=	'large';
							  
							  
							  ?>
                          <h4><span class="heading-icon"><i class="fa fa-th-<?php echo $type_class; ?>"></i></span><?php echo __('Property Listing'); ?></h4>
                          <div class="toggle-view pull-right">
                              <?php
							  if($List_type=='list') {
								  echo $this->Form->postLink('<i class="fa fa fa-th-large"></i>', array('controller'=>'Pages','action' => 'listing_type','grid'), array('escape' => false,'data-toggle'=>"tooltip" ,'title'=>'Click here for grid-view'));
								  echo '<a class="active"  data-toggle="tooltip" title="already list view" onclick="return false" href="#" ><i class="fa fa-th-list"></i></a>';
								  }
							  else { 
								  echo '<a  class="active" data-toggle="tooltip" title="already grid view" , onclick="return false" href="#" ><i class="fa fa-th-large"></i></a>';
							  echo $this->Form->postLink('<i class="fa fa-th-list"></i>', array('controller'=>'Pages','action' => 'listing_type','list'), array('escape' => false,'data-toggle'=>"tooltip" ,'title'=>'Click here for listing-view'));
							  } ?>                              
                          </div>
                      </div>
                      <?php if($List_type=='list'){ ?>
                    <div class="property-listing">
                        <ul>
				<?php foreach ($properties as $property): ?>
                          <li class="type-rent col-md-12">
                            <div class="col-md-4"> <a href="<?php echo $this->Html->url(array('action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?>" class="property-featured-image">
						<?php 
						if($property['Property']['image1'])
						$image1	=	'/files/property/thumb/'.$property['Property']['image1'];
						else
						$image1	=	'http://placehold.it/600x360&text=IMAGE+COMMING+SOON';
						 ?>

                            <?php echo $this->Html->image($image1,array('alt'=>$property['Property']['title'])); ?>
                            <span class="images-count"><i class="fa fa-picture-o"></i> 2</span> <span class="badges"><?php if(isset($property['Property']['contract_type'])) echo ucwords($property['Property']['contract_type']); ?></span> </a> </div>
                            <div class="col-md-8">
                              <div class="property-info">
                                <div class="price"><strong><?php if(isset($websiteSettings['currency_symbol'])) echo __($websiteSettings['currency_symbol']); ?></strong><span><?php echo h(number_format($property['Property']['price'])); ?></span></div>
                                <h3><?php echo $this->Html->link(__(h($this->Text->truncate($property['Property']['title'],33))),array('action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?></h3>
                                <span class="location"><?php if(isset($property['City']['abbrev'])) echo h($property['City']['abbrev']); ?></span>
                                <p><?php echo h($this->Text->truncate($property['Property']['description'],150)); ?></p>
                              </div>
                              <div class="property-amenities clearfix"> <span class="area"><strong><?php echo h($property['Property']['area']); ?></strong> <?php echo __('Area'); ?></span> <span class="baths"><strong><?php echo h($property['Property']['baths']); ?></strong> <?php echo __('Baths'); ?></span> <span class="beds"><strong><?php echo h($property['Property']['beds']); ?></strong> <?php echo __('Beds'); ?></span> <span class="parking"><strong><?php echo h($property['Property']['parking']); ?></strong> <?php echo __('Parking'); ?></span> </div>
                            </div>
                          </li>
				<?php endforeach; ?>
                      </ul>
                    </div>
                      <?php } else {  ?>
                    <div class="property-grid">
                      <ul class="grid-holder col-3">
				<?php $i=1; foreach ($properties as $property):  ?>
                        <li class="grid-item type-rent">
						<?php 
						if($property['Property']['image1'])
						$image1	=	'/files/property/thumb/'.$property['Property']['image1'];
						else
						$image1	=	'http://placehold.it/600x400&text=IMAGE+COMMING+SOON';
						 ?>
                        
                          <div class="property-block"> <a href="<?php echo $this->Html->url(array('action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?>" class="property-featured-image"> <?php echo $this->Html->image($image1,array('alt'=>$property['Property']['title'])); ?> <span class="images-count"><i class="fa fa-picture-o"></i> 2</span> <span class="badges"><?php if(isset($property['Property']['contract_type'])) echo ucwords($property['Property']['contract_type']); ?></span> </a>
                            <div class="property-info">
                              <h4><?php echo $this->Html->link(__(h($this->Text->truncate($property['Property']['title'],30))),array('action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?></h4>
                              <span class="location"><?php if(isset($property['City']['abbrev'])) echo h($property['City']['abbrev']); ?></span>
                              <div class="price"><strong><?php if(isset($websiteSettings['currency_symbol'])) echo __($websiteSettings['currency_symbol']); ?></strong><span><?php echo number_format($property['Property']['price']); ?></span></div>
                            </div>
                            <div class="property-amenities clearfix"> <span class="area"><strong><?php echo h($property['Property']['area']); ?></strong> <?php echo __('Area'); ?></span> <span class="baths"><strong><?php echo h($property['Property']['baths']); ?></strong> <?php echo __('Baths'); ?></span> <span class="beds"><strong><?php echo h($property['Property']['beds']); ?></strong> <?php echo __('Beds'); ?></span> <span class="parking"><strong><?php echo h($property['Property']['parking']); ?></strong> <?php echo __('Parking'); ?></span> </div>
                          </div>
                        </li>
				<?php endforeach; ?>

                      </ul>
                    </div>
                      <?php }  ?>
                    
                  <?php echo $this->element('paginate'); ?>  
                  </div>
                  <!-- Start Sidebar -->
                 <div class="sidebar right-sidebar col-md-3">
          <?php echo $this->element('side-bar-property-search-form'); ?>
          <?php echo $this->element('side-bar', array(), array('cache' => array('config' => 'cache'))); ?>
          </div>
                  <!-- End Sidebar -->
              </div>
          </div>
      </div>
  </div>
